package com.design.备忘录模式;

public class Originator {

	private String state;
	
	public String getState() {
		return state;
	}
	
	
	public void setState(String state) {
		this.state = state;
	}
	
	
	public Memento saveSateToMemento(){
		return new Memento(state);
	}
	
	public void setStateFromMemento(Memento m) {
		this.state = m.getState();
	}
	
}
